﻿<!DOCTYPE html>
<html>
<head>
    <title>登录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="public/themes/Bootstrap.css">
    <link rel="stylesheet" href="public/css/jquery.mobile-1.4.5.min.css" />
    <link rel="stylesheet" href="public/themes/jquery.mobile.icons.min.css" />

    <script src="../public/js/jquery.min.js"></script>
    <script src="public/js/jquery.mobile-1.4.5.min.js"></script>
</head>
<script>
    $(function(){
        $("#login").on("click",function(){
            $.ajax({
                type:"post",
                url:"login/login",
                data:{student_name:$("#student_name").val(),student_id_cart:$("#student_id_cart").val()},
                success:function(data){
                    alert(data.msg);
                    if(data.success==1){
                        $.mobile.changePage("index/index",
                                { transition: "slideup" });
                    }
                }
            })
        })
    })
</script>
<body>
<div data-role="page" data-theme="d">

    <div role="main" class="ui-content" >
        <div style="text-align: center">
            <h2 style="margin: 50px auto;">报考系统</h2>
        </div>
        <input type="text" name="textinput-4" data-icon="user" id="student_name" placeholder="姓名" value="">
        <input type="text" name="textinput-4" id="student_id_cart" placeholder="身份证号" value="">
        <input type="button" id="login" value="登录">
    </div><!-- /content -->

</div><!-- /page -->
</body>
</html>